<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>

<c:set var="contextPath" value="${pageContext.request.contextPath}" />
<fmt:bundle basename="message">
	<fmt:message key="web.application.title" var="applicationTitle"/>
</fmt:bundle>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
	<title>${applicationTitle}</title>
	<script type="text/javascript">
		jUsernameBlur = function(element){
			element.value = element.value.toUpperCase();
		};
	</script>
</head>
<body>
	<c:if test="${not empty sessionScope['SPRING_SECURITY_LAST_EXCEPTION'].message}">
		<div class="errorblock">
			Your login attempt was not successful, try again.<br /> Caused :
			${sessionScope["SPRING_SECURITY_LAST_EXCEPTION"].message}
		</div>
	</c:if>
	<form action="${contextPath}/j_spring_security_check" method="post">
		Usuario: <br />
		<input type="text" name="j_username" style="text-transform: uppercase;" onblur="jUsernameBlur(this)"/> <br />
		Contrase&ntilde;a: <br />
		<input type="password" name="j_password" /> <br />
		<input type="submit" value="Iniciar Sesi&oacute;n" />
	</form>
</body>
</html>
